<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@page import="java.util.List"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="<%=application.getContextPath() %>/css/css.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-1.6.min.js"></script>	
<script language="javascript" src="<%=application.getContextPath() %>/js/calendar_eu.js"></script>
<script type="text/javascript" src="<%=application.getContextPath() %>/js/jquery-ui-1.8.17.custom.min.js"></script>	
<link rel="stylesheet" href="<%=application.getContextPath() %>/css/jquery-ui-1.8.17.custom.css"/>
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.js"></script>	
<script type="text/javascript" src="<%=application.getContextPath()%>/js/jquery.validate.min.js"></script>
<script language="JavaScript" src="<%=application.getContextPath()%>/js/gen_validatorv4.js" type="text/javascript" ></script>

<%-- <link href="<%=application.getContextPath() %>/images/kk.css" rel="stylesheet" type="text/css" /> --%>
<script type="text/javascript">
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
</script>
<!-- <style>
  	#field, label { float: left; font-family: Arial, Helvetica, sans-serif; font-size: 11px;  }
  	label {  width: 14em; }
	br { clear: both; }
	input.error { border: 1px solid red;   }
	select.error{ border: 1px solid red;}
	label.error {
		
		margin-left:20px;
		color: red;
		position:absolute;
	}
	
</style> -->

</head>

 
<style>

	#editor{
	width:95%;
	}
	#remarksEditor{
	width:95%;
	}
	#nextsteppopup {
	position:absolute;
  z-index:200; /* aaaalways on top*/
  padding: 3px;
 
  width: 250px;
  color: white;
	}
	.ui-dialog .ui-state-error { padding: .3em; }
	.ui-corner-all{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.ui-corner-all:hover{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	font-weight: normal;
	color: #666666;
	text-decoration: none;
	}
	.logout{
	font-family: Arial, Helvetica, sans-serif;
	font-size: 11px;
	height: 15px;
	width: 50px;
	font-weight: normal;
	color: red;
	text-decoration: none;
	}
	#bulletinDialog title{
	font-family:Arial, Helvetica, sans-serif;
	font-size:14px;
	font-weight:bold;
	}
	</style>
    <script>

		$(function() {
		$( "#datepicker" ).datepicker({ dateFormat: "dd-mm-yy" });
		});
	</script>
<body  onload="MM_preloadImages('<%=application.getContextPath() %>/images/mb-hover.jpg','<%=application.getContextPath() %>/images/bp-hover.jpg','<%=application.getContextPath() %>/images/sp-hover.jpg')">
<form action="<%=application.getContextPath() %>/exeBudget/save.do" method="post" name="myform" id="myform">
<table width="927" style="height: 880px" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td height="116" align="left" valign="top" background="<%=application.getContextPath() %>/images/top-bg.jpg" style="background-repeat:repeat-x; background-position:left top">
    <%@ include file="../common/exe-header.jsp" %>
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
    	<tr>
    		<td align="left" valign="top">&nbsp;&nbsp;
    			<a href="<%=application.getContextPath() %>/user/open.do"><img src="<%=application.getContextPath() %>/images/home1.jpg" width="20" height="20" border="0" /></a>
    		</td>
    	<td align="center" valign="top">
    	<%
        if(request.getParameter("success")!=null){
        	out.println(request.getParameter("success"));
        }
        %>
    	</td>
    	<td width="8%" align="center"><a href="<%=application.getContextPath() %>/user/logout.do" style="font-family: sans-serif;">&nbsp;&nbsp;Logout</a></td>
    	</tr>
    	
    </table>
    </td>
  </tr>
  <tr>
    <td  align="left" valign="top"><table width="100%"  border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td width="23%" align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="5%">&nbsp;</td>
            <td width="95%"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image2','','<%=application.getContextPath() %>/images/eb-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/eb-hover.jpg" name="Image2" width="190" height="58" border="0" id="Image2" /></a></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','<%=application.getContextPath() %>/images/bp-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/bp-active.jpg" name="Image3" width="190" height="62" border="0" id="Image3" /></a></td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td><a href="https://www.google.com/calendar" target="_blank" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','<%=application.getContextPath() %>/images/sp-hover.jpg',1)"><img src="<%=application.getContextPath() %>/images/sp-active.jpg" name="Image4" width="190" height="57" border="0" id="Image4" /></a></td>
            </tr>
        </table></td>
        <td width="76%" valign="top"><table width="100%" height="177" cellpadding="0" cellspacing="0" class="box-border1">
          <tr>
            <td height="178"><table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
              <tr>
                <td height="23" align="center" valign="middle"  class="icon-header2"><strong>Executive Budget</strong></td>
              </tr>
              <tr>
                <td height="23" align="right" valign="middle">&nbsp;</td>
              </tr>
              <tr>
                <td height="23" align="left" valign="middle" class="icon-header2">&nbsp;Executive Name:
                 <select name="exeName" id="exeName" class="textfield required" onchange="getExeBudget()" >
                 	 <option value="">Please Select</option>
                 	 <%
                 	 List<Executives> exlist=(List<Executives>)request.getAttribute("exlist");
                 	 for(int i=0;i<exlist.size();i++){
                 		                	 
                 	 %>
                 	 <option value="<%= exlist.get(i).getId()%>"><%= exlist.get(i).getExeName()%></option>
                 	 <%} %>
                 </select>
                </td>
              </tr>
              <tr>
                <td height="23" align="right" valign="middle">&nbsp;</td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" cellpadding="0" cellspacing="0" >
                    <tr>
                     
                      <td width="14%"  class="icon-header2">&nbsp;Financial Year:</td>
                      <td width="15%" align="center" class="icon-header2">April
                      <select name="fromYear" id="fromYear" class="textfield" style="width: 70px" onchange="getExeBudget()">
                    				<option value="">Select</option>
                    				<option value="2012">2012</option>
                      				<option value="2013">2013</option>
                      				<option value="2014">2014</option>
                      				<option value="2015">2015</option>
                      				<option value="2016">2016</option>
                      				<option value="2017">2017</option>
                     		 		<option value="2018">2018</option>
                      				<option value="2019">2019</option>
                      				<option value="2020">2020</option>
                     			 	<option value="2021">2021</option>
                      				<option value="2022">2022</option>
                     		 		<option value="2023">2023</option>
                    			  </select>
                      </td>
                      <td width="4%" align="center" class="icon-header2">To</td>
                      <td width="16%" align="left" class="icon-header2">March
                      		<select name="toYear" id="toYear" class="textfield" style="width: 70px" onchange="getExeBudget()">
                    				<option value="">Select</option>
                    				<option value="2013">2013</option>
                      				<option value="2014">2014</option>
                      				<option value="2015">2015</option>
                      				<option value="2016">2016</option>
                      				<option value="2017">2017</option>
                     		 		<option value="2018">2018</option>
                      				<option value="2019">2019</option>
                      				<option value="2020">2020</option>
                     			 	<option value="2021">2021</option>
                      				<option value="2022">2022</option>
                     		 		<option value="2023">2023</option>
                     		 		<option value="2023">2024</option>
                    			  </select>
                      </td>
                      <td width="25%" align="right" class="icon-header2">Total: </td>
                      <td width="17%">&nbsp;<label id="total"></label></td>
                      <td width="2%">&nbsp;</td>
                    </tr>
                </table></td>
              </tr>
              <tr>
                <td height="23" align="right" valign="middle">(in lacs)&nbsp;</td>
              </tr>
              <tr>
                <td align="left" valign="top"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr>
                    <td><div id="demo">
                      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#ffffff" class="tablebox" id="infoTable" background="<%=application.getContextPath() %>/images/hed-bg-block.jpg" style="background-repeat:repeat-x; background-position:left top">
                        <thead >
                          <tr>
                            <th width="20%" align="center" valign="middle" class="hed">&nbsp;</th>
                            <th width="25%" align="center" valign="middle" class="hed">T.E</th>
                            <th width="25%" align="center" valign="middle" class="hed">C.P</th>
                            <th width="25%" align="center" valign="middle" class="hed">F.E</th>
                            </tr>
                          </thead>
                        <tbody>
                          <tr>
                            <td bgcolor="#CCCCCC" colspan="4">Quarter-1</td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth1" id="mnth_1" class="tdinput" value="April" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te1" id="te_1" class="tdinput number " value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp1" id="cp_1" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe1" id="fe_1" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth2" id="mnth_2" class="tdinput" value="May" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te2" id="te_2" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp2" id="cp_2" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe2" id="fe_2" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth3" id="mnth_3" class="tdinput" value="Jun" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                           <td align="center" bgcolor="#CCCCCC"><input type="text" name="te3" id="te_3" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp3" id="cp_3" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe3" id="fe_3" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td bgcolor="#CCCCCC" colspan="4">Quarter-2</td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth4" id="mnth_4" class="tdinput" value="July" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te4" id="te_4" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp4" id="cp_4" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe4" id="fe_4" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth5" id="mnth_5" class="tdinput" value="August" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te5" id="te_5" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp5" id="cp_5" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe5" id="fe_5" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth6" id="mnth_6" class="tdinput" value="September" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te6" id="te_6" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp6" id="cp_6" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe6" id="fe_6" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                          </tr>
                          <tr>
                            <td bgcolor="#CCCCCC" colspan="4">Quarter-3</td>
                          </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth7" id="mnth_7" class="tdinput" value="October" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te7" id="te_7" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp7" id="cp_7" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe7" id="fe_7" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                           </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth8" id="mnth_8" class="tdinput" value="November" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                           <td align="center" bgcolor="#CCCCCC"><input type="text" name="te8" id="te_8" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp8" id="cp_8" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe8" id="fe_8" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth9" id="mnth_9" class="tdinput" value="December" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te9" id="te_9" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp9" id="cp_9" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe9" id="fe_9" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td bgcolor="#CCCCCC" colspan="4">Quarter-4</td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth10" id="mnth_10" class="tdinput" value="January" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te10" id="te_10" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp10" id="cp_10" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe10" id="fe_10" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth11" id="mnth_11" class="tdinput" value="February" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te11" id="te_11" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp11" id="cp_11" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe11" id="fe_11" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          <tr>
                            <td align="right" bgcolor="#CCCCCC"><input type="text" name="mnth12" id="mnth_12" class="tdinput" value="March" style="text-align: right; font-size: 13px" readonly="readonly"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="te12" id="te_12" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="cp12" id="cp_12" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            <td align="center" bgcolor="#CCCCCC"><input type="text" name="fe12" id="fe_12" class="tdinput number" value="" style="text-align: center;" onblur="getTotal()"/></td>
                            </tr>
                          </tbody>
                        </table>
                      </div></td>
                    </tr>
                  <tr>
                    <td height="10" align="left" valign="top"></td>
                    </tr>
                  
                  </table></td>
              </tr>
               <tr>
                <td height="23" align="right" valign="middle"><input type="submit" class="button-black-right" value="Submit" onclick="return processFormData();"/></td>
              </tr>
              <tr>
                    <td height="10" align="left" valign="top"></td>
                    </tr>
            </table></td>
          </tr>
        </table></td>
        <td width="3%" valign="top">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td height="40" align="left" valign="top" bgcolor="#0B0B0B">&nbsp;</td>
  </tr>
</table></form>
</body>
</html>
<script type = "text/javascript">
function getTotal(){
	var total=0;
	for(var i=1;i<=12;i++){
		var te=$("#te_"+i).val();
		var cp=$("#cp_"+i).val();
		var fe=$("#fe_"+i).val();
		var t=0;
		var c=0;
		var f=0;
		if(te!=""){
			t=parseFloat(te);
		}
		
		if(cp!=""){
			c=parseFloat(cp);
		}
		
		if(fe!=""){
			f=parseFloat(fe);
		}
		
		total=total+t+c+f;
		
	}
	total=total.toFixed(2);
	$("#total").html(total);
}
</script>

<script type = "text/javascript">
function getExeBudget(){
	var exeName=$("#exeName").val();
	var fromYear=$("#fromYear").val();
	var toYear=$("#toYear").val();
	var f=parseInt(fromYear);
	var t=parseInt(toYear);
	if(exeName!=""){
	if(fromYear!="" && toYear!="" && t==(f+1)){
	var data="exeName="+exeName+"&fromYear="+fromYear+"&toYear="+toYear;
	$.ajax({
		url:"<%=application.getContextPath()%>/exeBudget/getExeBudget.do",
		mimetype:"text/plain",
		method: "post",
		cache: false,
		data: data,
		success:function(res){
			if(res.length!=0){
			var temp=res.split("/");
			var j=1;
			var total=0;			
			for(var n=0;n<temp.length;n++){
				if(temp[n]!=""){
				total=total+(parseInt(temp[n]));
			}
			}
			$("#total").html(total);
			for(var i=0;i<temp.length-3;i=i+3){
				
				 $("#te_"+j).val(temp[i]);
				$("#cp_"+j).val(temp[i+1]);
				$("#fe_"+j).val(temp[i+2]);
				j++;
				
			}
			}else {
				for(var k=1;k<=12;k++){
					 $("#te_"+k).val("");
					 $("#cp_"+k).val("");
					 $("#fe_"+k).val("");
				}
				$("#total").html("");
			}
		}
	});
}else {
	jAlert("Invalid Financial Year");
} 
}else {
	jAlert("Invalid Executive Name");
}
}

</script>

<script language="JavaScript" type="text/javascript">
 function processFormData(){
  var frmvalidator  = new Validator("myform");
  frmvalidator.addValidation("exeName", "req", "Please Select the Executive Name");
  
  var frmY=$("#fromYear").val();
  var fy=parseInt(frmY);
  var toY=$("#toYear").val();
  var ty=parseInt(toY);
  //alert(ty+" "+(fy+1));
 
  for(var i=1;i<=12;i++)
	  {
	 var mnth=$("#mnth_"+i);
  frmvalidator.addValidation("te"+i,"numeric","Please enter digits for T.E in the month  '"+mnth.val()+"'");
  frmvalidator.addValidation("cp"+i,"numeric","Please enter digits for C.P in the month  '"+mnth.val()+"'");
  frmvalidator.addValidation("fe"+i,"numeric","Please enter digits for F.E in the month  '"+mnth.val()+"'");
    
	  }
  
  if(ty!=(fy+1)){
		jAlert("InValid Financial Year");
		return false;
	}else {
		return true;
	}
}
</script>
